package com.tbq.game.service.socket.netty

 object NettyLog {
     val debug = true    //是否开启调试
     val tag = "Netty"  //缺省的 tag
     val prefix = ""    //日记输出前缀
    /*--------------------------------------Log输出-----------------------------------------*/
    fun i(msg: String) {
        if (debug) {
            try {
                android.util.Log.i(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }

    fun i(tag: String, msg: String) {
        if (debug) {
            try {
                android.util.Log.i(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }

    fun d(tag: String, msg: String) {
        if (debug) {
            try {
                android.util.Log.d(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }

    fun v(tag: String, msg: String) {
        if (debug) {
            try {
                android.util.Log.v(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }

    fun w(tag: String, msg: String) {
        if (debug) {
            try {
                android.util.Log.w(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }


    fun e(msg: String) {
        if (debug) {
            try {
                android.util.Log.e(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }

    fun e(tag: String, msg: String) {
        if (debug) {
            try {
                android.util.Log.e(tag + prefix, msg)
            } catch (e: Exception) {

            }

        }
    }


    fun e(tag: String, msg: String, tr: Throwable) {
        if (debug) {
            try {
                android.util.Log.e(tag + prefix, msg, tr)
            } catch (e: Exception) {

            }

        }
    }

    fun e(tag: String, msg: String, tr: Exception) {
        if (debug) {
            try {
                android.util.Log.e(tag + prefix, msg, tr)
            } catch (e: Exception) {

            }

        }
    }

}